﻿#nullable enable
using SqlSugar;

namespace Rmac.DataBase.Entity
{
    /// <summary>
    /// 工单材料明细
    /// </summary>
    [SugarTable("MaterialIssueChild")]
    public class MaterialIssueChild
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 父表ID
        /// </summary>
        [SugarColumn(ColumnDescription = "父表ID")]
        public int? Pid { get; set; }

        /// <summary>
        /// 序号
        /// </summary>
        [SugarColumn(ColumnDescription = "序号")]
        public int? Noid { get; set; }

        /// <summary>
        /// 工序号
        /// </summary>
        [SugarColumn(ColumnDescription = "工序号")]
        public int? RountNo { get; set; }

        /// <summary>
        /// 材料编码
        /// </summary>
        [SugarColumn(ColumnDescription = "材料编码")]
        public string? InventoryID { get; set; }

        /// <summary>
        /// 材料名称
        /// </summary>
        [SugarColumn(ColumnDescription = "材料名称")]
        public string? InventoryDesc { get; set; }

        /// <summary>
        /// 计划量
        /// </summary>
        [SugarColumn(ColumnDescription = "计划量")]
        public double? PlanQty { get; set; }

        /// <summary>
        /// 实际量
        /// </summary>
        [SugarColumn(ColumnDescription = "实际量")]
        public double? ActQty { get; set; }

        /// <summary>
        /// 追加量
        /// </summary>
        [SugarColumn(ColumnDescription = "追加量")]
        public double? AddQty { get; set; }

        /// <summary>
        /// 公差值
        /// </summary>
        [SugarColumn(ColumnDescription = "公差值")]
        public double? Tolerance { get; set; }

        /// <summary>
        /// 上限
        /// </summary>
        [SugarColumn(ColumnDescription = "上限")]
        public double? TopLimit { get; set; }
        
        /// <summary>
        /// 下限
        /// </summary>
        [SugarColumn(ColumnDescription = "下限")]
        public double? LowerLimit { get; set; }

        /// <summary>
        /// 毛重
        /// </summary>
        [SugarColumn(ColumnDescription = "毛重")]
        public double? GrossWeight { get; set; }
        
        /// <summary>
        /// 皮重
        /// </summary>
        [SugarColumn(ColumnDescription = "皮重")]
        public double? Tare { get; set; }
        
        /// <summary>
        /// 批号
        /// </summary>
        [SugarColumn(ColumnDescription = "批号")]
        public string? ProjectBatch { get; set; }

        /// <summary>
        /// 电子称
        /// </summary>
        [SugarColumn(ColumnDescription = "电子称")]
        public string? Scale { get; set; }

        /// <summary>
        /// 组合配
        /// </summary>
        [SugarColumn(ColumnDescription = "组合配")]
        public string? Combination { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(ColumnDescription = "状态")]
        public int? Status { get; set; }

        /// <summary>
        /// 是否方外料
        /// </summary>
        [SugarColumn(ColumnDescription = "是否方外料",DefaultValue = "1")]
        public BomInvInOrOut? IsBomOutInv { get; set; }

        [Navigate(NavigateType.Dynamic, null)]
        public MaterialIssue FG_Issue { get; set; }
    }
}
